.class public Lcom/fiberhome/gaea/client/c/a/b;
.super Ljava/lang/Object;


# direct methods
.method public static a(Ljava/lang/String;)Lcom/fiberhome/gaea/client/c/a/a;
    .locals 6

    const/4 v2, 0x0

    :try_start_0
    invoke-static {}, Lorg/xmlpull/v1/XmlPullParserFactory;->newInstance()Lorg/xmlpull/v1/XmlPullParserFactory;

    move-result-object v0

    invoke-virtual {v0}, Lorg/xmlpull/v1/XmlPullParserFactory;->newPullParser()Lorg/xmlpull/v1/XmlPullParser;

    move-result-object v4

    new-instance v0, Ljava/io/ByteArrayInputStream;

    invoke-virtual {p0}, Ljava/lang/String;->getBytes()[B

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/ByteArrayInputStream;-><init>([B)V

    new-instance v1, Ljava/io/InputStreamReader;

    invoke-direct {v1, v0}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V

    invoke-interface {v4, v1}, Lorg/xmlpull/v1/XmlPullParser;->setInput(Ljava/io/Reader;)V

    move-object v3, v2

    move-object v1, v2

    :cond_0
    :goto_0
    :pswitch_0
    invoke-interface {v4}, Lorg/xmlpull/v1/XmlPullParser;->next()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :pswitch_1
    goto :goto_0

    :goto_1
    :pswitch_2
    return-object v1

    :pswitch_3
    new-instance v0, Lcom/fiberhome/gaea/client/c/a/a;

    invoke-direct {v0, v3}, Lcom/fiberhome/gaea/client/c/a/a;-><init>(Lcom/fiberhome/gaea/client/c/a/a;)V

    invoke-static {v4}, Lcom/fiberhome/gaea/client/c/a/b;->a(Lorg/xmlpull/v1/XmlPullParser;)Ljava/util/HashMap;

    move-result-object v5

    iput-object v5, v0, Lcom/fiberhome/gaea/client/c/a/a;->d:Ljava/util/HashMap;

    invoke-interface {v4}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;

    move-result-object v5

    iput-object v5, v0, Lcom/fiberhome/gaea/client/c/a/a;->b:Ljava/lang/String;

    if-nez v3, :cond_1

    move-object v1, v0

    :goto_2
    move-object v3, v0

    goto :goto_0

    :cond_1
    iget-object v3, v3, Lcom/fiberhome/gaea/client/c/a/a;->c:Ljava/util/ArrayList;

    invoke-virtual {v3, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_2

    :catch_0
    move-exception v0

    move-object v1, v2

    goto :goto_1

    :pswitch_4
    if-eqz v3, :cond_0

    iget-object v0, v3, Lcom/fiberhome/gaea/client/c/a/a;->a:Lcom/fiberhome/gaea/client/c/a/a;

    move-object v3, v0

    goto :goto_0

    :pswitch_5
    if-eqz v3, :cond_0

    invoke-interface {v4}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/fiberhome/gaea/client/d/k;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, v3, Lcom/fiberhome/gaea/client/c/a/a;->e:Ljava/lang/String;
    :try_end_0
    .catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1

    goto :goto_0

    :catch_1
    move-exception v0

    move-object v1, v2

    goto :goto_1

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_2
        :pswitch_3
        :pswitch_4
        :pswitch_5
        :pswitch_1
        :pswitch_1
        :pswitch_0
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public static a(Ljava/lang/String;Landroid/content/Context;)Lcom/fiberhome/gaea/client/c/a/a;
    .locals 1

    invoke-static {p0, p1}, Lcom/fiberhome/gaea/client/d/c;->e(Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return-object v0

    :cond_0
    invoke-static {v0}, Lcom/fiberhome/gaea/client/c/a/b;->a(Ljava/lang/String;)Lcom/fiberhome/gaea/client/c/a/a;

    move-result-object v0

    goto :goto_0
.end method

.method private static a(Lorg/xmlpull/v1/XmlPullParser;)Ljava/util/HashMap;
    .locals 5

    invoke-interface {p0}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeCount()I

    move-result v1

    new-instance v2, Ljava/util/HashMap;

    invoke-direct {v2, v1}, Ljava/util/HashMap;-><init>(I)V

    const/4 v0, 0x0

    :goto_0
    if-ge v0, v1, :cond_0

    invoke-interface {p0, v0}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeName(I)Ljava/lang/String;

    move-result-object v3

    invoke-interface {p0, v0}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeValue(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_0
    return-object v2
.end method
